package com.hurl.library.http;

import java.io.File;

public class HttpUtils {
	public static String request(String url) throws HttpException{
		return request(url,null);
	}
	private static String request(String url,HttpOptions options) throws HttpException{
		HttpRequest requester = new HttpRequest(options);
		return requester.request(url);
	}
	private static void requestImage(String url,File saveToFile,HttpOptions options) throws HttpException{
		HttpRequest requester = new HttpRequest(options);
		requester.requestImage(url,saveToFile);
	}

	public static void requestImage(String url,File target) throws HttpException{
		requestImage(url,target,null);
	}
}
